import { createSlice } from "@reduxjs/toolkit";

// 初始化的数据
const initialState = {
  urlPath: "/sys/index",
};

// 创建Slice
const pathSlice = createSlice({
  name:"path",
  initialState,
  reducers:{
    setUrlPath(state,{payload}){
      // console.log(action)
      state.urlPath = payload
    }
  }
})

// 导出action
export const { setUrlPath } = pathSlice.actions
// 导出reducer
export default pathSlice.reducer
